#ifndef __SERVER_H__
#define __SERVER_H__

#include "myhead.h"
#include "msg.h"
#include "list_queue.h"

#define SERVERIP "192.168.31.131"
#define SERVERPORT "8800"


int set_server_ip(const char *ip);
int set_server_port(int port);

int get_serversockfd();
void set_infomsg_err(char *buf);
char *get_infomsg_err();
int server_init();
int server_accept(struct sockaddr_in *clientaddr);
int json_to_struct(char *json_string, msg_t *climsg);
int struct_to_json(char *json_string, msg_t *climsg);
int recv_json_to_struct(list_t *clinode, msg_t *clientmsg);


#endif